<?php
include ("../lib/BLL/DonViCTDTBLL.php");

$thongbao="";
$donvi_ctdtBLL = new DonViCTDTBLL();

if (isset($_POST['timkiem'])) {
    $tukhoa1="";
	$where="";
	if(isset($_POST['madvtk']) or isset($_POST['mactdttk']))
	{
        if(($_POST['madvtk']=='0') &&($_POST['mactdttk']=='0')) {
            $where="WHERE 1=1";
        } else {
		$tukhoa1=$_POST['madvtk'];
        $tukhoa2=$_POST['mactdttk'];
		$where="WHERE".$donvi_ctdtBLL->searchListDonViCTDT($tukhoa1,$tukhoa2);
        }
    }
}
if(!isset($_POST['timkiem'])||($_POST['madvtk']=="") ||($_POST['mactdttk']=="")){
    $where="WHERE 1=1";
}
$ds = $donvi_ctdtBLL->timkiem($where);
////////////////////////////////////////////////////////////////////////////////
//$ds = $donvi_ctdtBLL->getListDonViCTDT();
/////////////////////////////////
include ("../lib/BLL/DonViBLL.php");
include ("../lib/BLL/ChuongTrinhDaoTaoBLL.php");

$donviBLL = new DonViBLL();
$ctdtBLL = new ChuongTrinhDaoTaoBLL();

$dsdonvi = $donviBLL->GetlistDonVi();
$smarty->assign('ds_donvi',$dsdonvi);

$dsctdt = $ctdtBLL->getAllCTDT();
$smarty->assign('ds_ctdt',$dsctdt);

////////////////////////////////////

$smarty -> assign('thongbao',$thongbao);
$smarty -> assign('ds_dv_ctdt', $ds);
$smarty->display('nhom3/tbl_donvi_ctdt/dmDonVi_ctdt.tpl')
?>